package com.gh.cloud.common.oauth2.constant;

/**
 * Security 权限常量
 *
 * @author guohao
 */
public interface SecurityConstants {
    String REDIS_AUTH_PREFIX = "GH_AUTH:";

    /**
     * 默认token过期时间(1小时)
     */
    Integer ACCESS_TOKEN_VALIDITY_SECONDS = 60 * 60;

    /**
     * 缓存client的redis key，这里是hash结构存储
     */
    String CACHE_CLIENT_KEY = "oauth_client_details";

    /**
     * redis中授权token对应的key
     */
    String REDIS_TOKEN_AUTH = "auth:";

    /**
     * redis中用户名对应的token集合的key
     */
    String REDIS_UNAME_TO_ACCESS = "uname_to_access:";

    /**
     * redis中应用对应的token集合的key
     */
    String REDIS_CLIENT_ID_TO_ACCESS = "client_id_to_access:";

    /**
     * rsa公钥
     */
    String RSA_PUBLIC_KEY = "pubkey.txt";
}
